package com.qingke.service.impl;

import java.util.List;

import javax.annotation.Resource;

import org.springframework.stereotype.Service;

import com.qingke.mapper.LogRecordMapper;
import com.qingke.pojo.LogRecord;
import com.qingke.service.LogRecordService;
@Service("logRecordService")
public class LogRecordServiceImpl implements LogRecordService {
    @Resource
	private LogRecordMapper lrDao;
	
	public int saveLogRecord(LogRecord record) {
		return lrDao.insertSelective(record);
	}

	public int softDelete(int id) {
		return lrDao.softDelete(id);
	}

	public LogRecord getLogRecordById(int id) {
		return lrDao.selectByPrimaryKey(id);
	}

	public List<LogRecord> listLogRecord() {
		return lrDao.listLogRecord();
	}

	public int updateLogRecord(LogRecord record) {
		return lrDao.updateByPrimaryKeySelective(record);
	}

	public List<LogRecord> listLogRecordByEmployeeId(int employeeId) {
		return lrDao.listLogRecordByEmployeeId(employeeId);
	}

}
